<?PHP
class Page extends Resource {

	public function __construct($page) {
		// Cut off trailing /'s
		$page = preg_replace('/\/$/','',$page);

		// Redirect / URI's to the homepage
		if($page == '')
			$page = TeeWee::$CONFIG->PAGE_DEFAULT;

		$folder	= TeeWee::$CONFIG->PAGE_DIR.'/'.$page;
		$file		= TeeWee::$CONFIG->PAGE_START;
		parent::__construct($folder,$file);
	}

}
?>
